package com.serial.comm.modular.serialPort.model;

import java.io.Serializable;

import java.util.Date;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 不合法的单一电报信息表
 * </p>
 *
 * @author chentl123
 * @since 2020-02-23
 */
@TableName("wh_serial_telegram_Illegal")
public class TelegramIllegal extends Model<TelegramIllegal> {

    private static final long serialVersionUID = 1L;

    public TelegramIllegal() {
    }

    /**
     * 用于异常单一电报信息入库
     * @param exceptionReason
     * @param sourceId
     */
    public TelegramIllegal(String exceptionReason, Integer sourceId,String content) {
        this.exceptionReason = exceptionReason;
        this.sourceId = sourceId;
        this.content = content;
    }

    private Integer id;
    /**
     * 报文内容
     */
    private String content;
    /**
     * 报文异常理由
     */
    private String exceptionReason;
    /**
     * 完整报文原始id(对应wh_serial_origin表中的id )
     */
    private Integer sourceId;
    /**
     * 创建时间
     */
    private Date createTime;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getExceptionReason() {
        return exceptionReason;
    }

    public void setExceptionReason(String exceptionReason) {
        this.exceptionReason = exceptionReason;
    }

    public Integer getSourceId() {
        return sourceId;
    }

    public void setSourceId(Integer sourceId) {
        this.sourceId = sourceId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "TelegramIllegal{" +
        ", id=" + id +
        ", exceptionReason=" + exceptionReason +
        ", sourceId=" + sourceId +
        ", createTime=" + createTime +
        "}";
    }
}
